#include "BulletInterface.h"

namespace Facets {
	BulletInterface::BulletInterface() {
        m_AABBMin = btVector3(-10000,-10000,-10000);
        m_AABBMax = btVector3(10000,10000,10000);
        m_MaxProxies = 1024;
        m_Broadphase = new btAxisSweep3(m_AABBMin,m_AABBMax,m_MaxProxies);
        m_CollisionConfig = new btDefaultCollisionConfiguration();
        m_Dispatcher = new btCollisionDispatcher(m_CollisionConfig);
        m_Solver = new btSequentialImpulseConstraintSolver;
        m_World = new btDiscreteDynamicsWorld(m_Dispatcher,m_Broadphase,m_Solver,m_CollisionConfig);
	}
	
	BulletInterface::~BulletInterface() {
        delete m_Broadphase;
        delete m_CollisionConfig;
        delete m_Dispatcher;
        delete m_Solver;
        delete m_World;
	}
}
